﻿#include "database.h"
#include "sql/databasesql.h"

static DataBase* instance = nullptr;
DataBase* DataBase::CreateDataBase(const QString& path)
{
	if (!path.isEmpty()) {
		if (instance != nullptr) {
			delete instance;
		}

#ifdef SQL_ENABLE
		instance = new DataBaseSql(path);
#endif // SQL_ENABLE		
	}

	return instance;
}
